{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
<!--左侧导航结束-->
        <style>
		@media only screen and (max-width: 760px),(min-device-width: 768px) and (max-device-width:1024px)  {
		#mytable, #mytable thead, #mytable tbody, #mytable th, #mytable td, #mytable tr { 
			display: block; 
		}
		#mytable thead tr { 
			position: absolute;
			top: -9999px;
			left: -9999px;
		}
		#mytable td { 
			border: none;
			border-bottom: 1px solid #eee; 
			position: relative;
			padding-left:44% !important; 
			padding-top:10px ;
		}
	    #mytable tr{ margin-bottom:20px;}
		#mytable td:before { 
			position: absolute;
			top:10px;
			left:8px;
			width: 45%; 
			padding-right:10px;

			white-space: nowrap;
		}
		    #mytable td:nth-of-type(1):before { content: "活动项目名称"; }
			#mytable td:nth-of-type(2):before { content: "年级"; }
			#mytable td:nth-of-type(3):before { content: "学科"; }
			#mytable td:nth-of-type(4):before { content: "提交人"; }
			#mytable td:nth-of-type(5):before { content: "时间"; }
			#mytable td:nth-of-type(6):before { content: "操作"; }
        }		
	</style>
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form name="myform" action="" method="get">
                <div class="box-header with-border">
                    <span class="fa fa-fire" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">学科活动</p>
					<a href="index.php?a=activityssubject.activityssubjectadd" class="btn btn-primary btn-sm" style="float:right;">新 增</a>
                </div>
                <div class="box-body">
                      <div class="col-md-3 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-3 control-label" style="padding-right:0; padding-left:0; font-weight:500;">
							   年级：
						  </label>
						  <div class="input-group col-md-9 col-xs-12">
							   <select class="form-control" name="grade_id">
							   <option value="">全部</option>
							   {%foreach from=$grade_list key=key item=value%}
									  <option value="{%$value.grade_id%}"{%if $value.grade_id ==$grade_id%}selected{%/if%}>{%$value.grade_name%}</option>
							   {%/foreach%}
                                </select>
						  </div> 
				    </div>
					<div class="col-md-3 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500; margin:0;">
							   学科：
						  </label>
						  <div class="input-group col-md-9 col-xs-12">
							   <select class="form-control" name="subject_id">
									  <option value="">全部</option>
							   {%foreach from=$subject_list key=key item=value%}
									  <option value="{%$value.subject_id%}"{%if $value.subject_id ==$subject_id%}selected{%/if%}>{%$value.subject_name%}</option>
							   {%/foreach%}
                                </select>
						  </div> 
				    </div>
					<div class="col-md-5 col-xs-12 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-2 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500; ">
							   时间：
						  </label>
						  <div class="input-group col-md-4" style="float:left;">
							   <input type="text" class="form-control"  id="from" name="from" value="{%$from%}">
							     <div class="input-group-addon" style="padding:6px 7px;">
									<i class="fa fa-calendar"></i>
								 </div>
						  </div>
						  <span style="float:left;">  ~  </span >
						  <div class="input-group col-md-4" style="float:left;">
							   <input type="text" class="form-control" value="{%$to%}" id="to" name="to">
							      <div class="input-group-addon" style="padding:6px 7px;">
									 <i class="fa fa-calendar"></i>
								 </div>
						  </div>						  
				    </div>
					<div class="col-md-1 col-xs-12">
					   <input type="hidden" name="a" value="activitysSubject.activityssubjectlist">
					   <button type="submit" class="btn btn-warning">查 询</button>
					</div>
					<div style="clear:both; height:10px;"></div>
                     <table class="table table-bordered table-striped" id="mytable">
                                <thead>
                                    <tr style="background-color:#fcb53f;">
									    <td>活动项目名称</td>
                                        <td>年级</td>
                                        <td>学科</td>
                                        <td>提交人</td>
										<td>时间</td>
										<td width="130">操作</td>
                                    </tr>	
                                </thead>
                                <tbody>
								{%foreach from=$activitys_list key=key item=value%}
                                    <tr>
									    <td><a href="index.php?a=activityssubject.particular&activitys_id={%$value.activitys_id%}">{%$value.activitys_title%}</a></td>
                                        <td>{%$value.grade_name%}</td>
                                        <td>{%$value.subject_name%}</td>
                                        <td>{%$value.user_name%}</td>
										<td>{%$value.create_time%}</td>
										<td>
                                        	  <a href="index.php?a=activityssubject.activityssubjectupdate&activitys_id={%$value.activitys_id%}" class="btn btn-warning btn-sm"  title="修改"> <i class="fa fa-edit (alias)"></i>
</a>
											  <a href="index.php?a=activityssubject.activityssubjectdel&activitys_id={%$value.activitys_id%}" class="btn btn-danger btn-sm" onclick="if(confirm('警告！确认删除信息?')==false)return false;"  title="删除"> <i class="fa fa-trash"></i></a>
                                        </td>
                                    </tr>	
                                {%/foreach%}    
                            </tbody>
                        </table>
				   </div><!--box-body -->
               </form>
			   <div class="box-footer">
			   {%$page%}
			   </div>
           </div><!--box box-default box-solid-->
        </section>   
           
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->

{%include file="index.footer.tpl.php"%}
<script>
  $(function() {
    $( "#from" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
	  changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#to" ).datepicker( "option", "minDate", selectedDate );
      }
    });
    $( "#to" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
      changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#from" ).datepicker( "option", "maxDate", selectedDate );
      }
    });
  });
 </script>
